This Rmd file is intended to capture the processing workflow for AIMS PT data from YMR (Youngmeter Ranch).

It takes barometrically corrected PT data (waterHeight_m) and should produce the following output columns:

One complicating factor is that the waterDepth_m field can be NA if the sensor is dry OR if there is missing/bad data. To interpret this, use the wetdry column.

Set up workspace

## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
## ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
## ✔ purrr     1.0.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## 
## Attaching package: 'zoo'
## 
## 
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## 
## 
## Rows: 35 Columns: 23
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (11): Region, Watershed, Site, Samplers, Date, pH, Connected?, Flowing?...
## dbl  (10): Temp (*C), Pressure (mmHg), DO (%), DO (mg/L), Specific Cond. (uS...
## time  (2): Time (CST), Time (UTC)
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## [1] "EN201" "EN301" "ENM04" "ENM06" "ENM08" "ENM11"

ENM11 processing

load data

## Rows: 82248 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 101681 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## [1] "ENM11 calculated offsets"
## [1] "SW = -0.04206"
## [1] "PI = -0.660804"

iterative cleaning and adjustments - step with lots of manual decisions

All interactive plots made during process will be commented out for knitting.

QAQC, save, and visualize

## 
##     D     Z    ZD  <NA> 
## 69063   632  2029 45165
## 
##     D     Z    ZD  <NA> 
## 73740   201  1936 10599

ENM08 processing

load data

## Rows: 101704 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 60555 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## [1] "ENM08 calculated offsets"
## [1] "SW = -0.0914400000000002"
## [1] "PI = -0.734568"

iterative cleaning and adjustments - step with lots of manual decisions

All interactive plots made during process will be commented out for knitting.

QAQC, save, and visualize

## 
##     D     Z    ZD  <NA> 
## 34553   613   963 28654
## 
##     D     Z    ZD  <NA> 
## 81957   481  2271 32180

ENM06 processing

load data

## Rows: 82246 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 101700 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## [1] "ENM06 calculated offsets"
## [1] "SW = -0.10668"
## [1] "PI = -0.566928"

iterative cleaning and adjustments - step with lots of manual decisions

All interactive plots made during process will be commented out for knitting.

QAQC, save, and visualize

## 
##     D     Z    ZD  <NA> 
## 28456  1931   745 85757
## 
##     D     T     Z    ZD    ZT  <NA> 
## 42831   200  1094  1150     1 41198

ENM04 processing

load data

## Rows: 101682 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 101692 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## [1] "ENM04 calculated offsets"
## [1] "SW = -0.00914400000000004"
## [1] "PI = -0.679704"

iterative cleaning and adjustments - step with lots of manual decisions

All interactive plots made during process will be commented out for knitting.

QAQC, save, and visualize

## 
##     D     Z    ZD  <NA> 
## 41775  1262  1124 72728
## 
##     D     T     Z    ZD    ZT  <NA> 
## 60936   635  1026  1617     2 52673

EN301 processing

load data

## Rows: 101699 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 101691 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## [1] "EN301 calculated offsets"
## [1] "SW = -0.140208"
## [1] "PI = -0.597408"

iterative cleaning and adjustments - step with lots of manual decisions

All interactive plots made during process will be commented out for knitting.

QAQC, save, and visualize

## 
##     D     Z    ZD  <NA> 
## 48845  1176  1332 65536
## 
##     D     T     Z    ZD    ZT  <NA> 
## 76311     1   459  1682     1 38435

EN201 processing

load data

## Rows: 101700 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 79988 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): siteId, sublocation, rep
## dbl  (4): tempC, sensorPressure_kPa, baroPressure_kPa, waterHeight_m
## dttm (1): datetime
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## [1] "EN201 calculated offsets"
## [1] "SW = -0.402336"
## [1] "PI = -0.667512"

iterative cleaning and adjustments - step with lots of manual decisions

All interactive plots made during process will be commented out for knitting.

QAQC, save, and visualize

## 
##     D     Z    ZD  <NA> 
## 35597  1055  1016 79221
## 
##     D     Z    ZD  <NA> 
## 75947   609  2116 38217